<?php
    session_start();
    if(isset($_SESSION['admin'])){
        require_once("viewmenu.php");
?>
<!DOCTYPE html>
<html lang="pt-br">
    <head>
	<meta charset="utf-8">
	<link rel="stylesheet" type="text/css" href="css/estilo.css" />
	<link rel="stylesheet" type="text/css" href="css/corpo.css" />
        <script type="text/javascript" src="js/jquery-2.1.1.js"></script>
        <script type='text/javascript' src='js/jquery.form.js'></script>
        <script type="text/javascript" src="js/user.cadastrar.js"></script>
	<title>Cadastro</title>        
    </head>
    <body>
	<div id='centro'>
            <p>Cadastrar Usuário</p>
            <fieldset>
            <div class="mensagem-erro"></div>                
            <form name="usercadastro" id="usercadastro" method="post" action="../control/ControleUserCadastrar.php">
                    <table>
                        <tr>
                            <td class="td1">Nome:</td>
                            <td class="td2"><input type='text' name='nome' id="nome" class="input-text" autofocus required/></td>
                        </tr>
                        <tr>
                            <td class="td1">Login:</td>
                            <td class="td2"><input type='text' name='login' id="login" class="input-text" required title="Campo obrigatório!"/></td>
                        </tr>
                        <tr>
                            <td class="td1">Senha:</td>
                            <td class="td2"><input type='password' name='senha' id="senha" class="input-text"  required title="Campo obrigatório!"/></td>
                        </tr>
                        <tr>
                            <td class="td1">Nível de acesso:</td>
                            <td class="td2"><input type='text' name='accessLevel' id="accessLevel" class="input-text"  required title="Campo obrigatório!"/></td>
                        </tr>                        
                        <tr>
                            <td colspan="2"><input type='submit' name='controle' value='Cadastrar'/></td>
                        </tr>
                    </table>
            </form>
            </fieldset>
	</div>
    </body>
</html>
<?php
    }else{
        header("Location: index.php");
    }
?>